package ute.mvc.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import com.fasterxml.jackson.annotation.JsonIgnore;

@Entity
public class Question implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 7766959407262273414L;
	@Id
	@Column(length = 20)
	private String questionId;
	@Column(length = 1000)
	private String question;
	@Column(length = 1000)
	private String answer;
	private float point;
	private String rightAnswer;
	private int type = 1;

	@JsonIgnore
	@ManyToOne
	@JoinColumn(name = "questionPoolId")
	private QuestionPool questionPool;

	@JsonIgnore
	@ManyToOne
	@JoinColumn(name = "testPartId")
	private TestPart testPart;

	public String getQuestionId() {
		return questionId;
	}

	public void setQuestionId(String questionId) {
		this.questionId = questionId;
	}

	public String getQuestion() {
		return question;
	}

	public void setQuestion(String question) {
		this.question = question;
	}

	public String getAnswer() {
		return answer;
	}

	public void setAnswer(String answer) {
		this.answer = answer;
	}

	public float getPoint() {
		return point;
	}

	public void setPoint(float point) {
		this.point = point;
	}

	public String getRightAnswer() {
		return rightAnswer;
	}

	public void setRightAnswer(String rightAnswer) {
		this.rightAnswer = rightAnswer;
	}

	public QuestionPool getQuestionPool() {
		return questionPool;
	}

	public void setQuestionPool(QuestionPool questionPool) {
		this.questionPool = questionPool;
	}

	public TestPart getTestPart() {
		return testPart;
	}

	public void setTestPart(TestPart testPart) {
		this.testPart = testPart;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}
}
